package org.xq.modules.shop.service.mapper;

import org.xq.common.mapper.CoreMapper;
import org.xq.modules.shop.domain.XqUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
* @author admin
* @date 2021-05-12
*/
@Repository
@Mapper
public interface UserMapper extends CoreMapper<XqUser> {

    @Update( "update xq_user set status = #{status} where uid = #{id}")
    void updateOnstatus(@Param("status") int status, @Param("id") int id);

    @Update( "update xq_user set now_money = now_money + ${money} where uid = #{id}")
    void updateMoney(@Param("money") double money, @Param("id")int id);

    @Update("update xq_user set brokerage_price = brokerage_price+ ${price} where uid = #{id}")
    void incBrokeragePrice(@Param("price")double price,@Param("id") int id);

}
